<template>
  <div id="canvas"></div>
</template>
<script lang="ts" setup>
import Konva from 'konva'

onMounted(() => {
  const stage = new Konva.Stage({
    container: 'canvas',
    width: 500,
    height: 500
  })
  const layer = new Konva.Layer()
  const rect = new Konva.Rect({
    x: 0,
    y: 0,
    width: 100,
    height: 100,
    fill: 'red',
    cornerRadius: [0, 10, 20, 30],
    draggable: true
  })
  layer.add(rect)
  stage.add(layer)
  stage.draw()
})
</script>
